package arithmetic.socket.netty.chat;

import java.util.UUID;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * @author jiangfeng
 * Created on 2020-02-28
 */
public class ChatClintHandler extends SimpleChannelInboundHandler<String> {
    String msg = UUID.randomUUID().toString();

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
        //ctx.channel().("[自己]:" + msg);
        System.out.println(msg);
       // ctx.writeAndFlush("客户端:"+ctx.channel().remoteAddress());
    }


}
